CAD Model Detail

Some objects are almost symmetrical, and only a small detail decides which way they face. This page explains how to make the CAD localization engine use such details to find the correct pose of the object. It applies to both Bin Picking Studio (BPS) and Locator Studio (LS).

In the Studio this is done in two steps, and the page follows them:

  1. Model features – you mark the important details on the 3D model of the object. See Model feature.

  2. Feature alignment – you tell the localization engine how the object can be wrongly turned or shifted, so it can try other poses and pick the one where the details match best. See Feature alignment.

Object with a feature on its side found incorrectly and correctly

Object with a feature on its side, found incorrectly (left) and correctly (right)

Feature alignment also helps with objects that look almost the same when shifted along one axis, for example objects with a repeating pattern. Such objects are often found shifted. Feature alignment finds the correct position.

Keep in mind:

  • The feature must be clearly visible in the scan.

  • Feature alignment is optional. You may be able to tune the localization well enough without it.

1 Model feature

A model feature is a part of the object that shows its exact pose. To let the localization use it, mark it on the 3D model of the object by drawing a region of interest (ROI) around it. Do this on the Model Feature tab of the localization profile editor (see Localization profile editor).

1.1 Model feature list

The Model feature list shows all model features of the object. You can define up to 5 model features per object.

1.1.1 Controls

  • Status indicator – shows whether a model feature has unsaved changes.

  • Visibility toggle – shows or hides a model feature.

  • Copy button – copies a model feature.

  • Delete button – deletes a model feature.

Model feature list with its controls

Model feature list

1.2 Model feature properties

Each model feature has these properties:

  • Name – a name to identify the feature.

  • Weight – how important the feature is compared with the other features.

  • Size (Width, Height, Depth) – the dimensions of the feature.

  • Position – the position of the feature relative to the origin of the object model.

  • Rotation – the rotation of the feature relative to the origin of the object model.

Properties of a model feature

Model feature properties

The easiest way to set the size, position and rotation is in the 3D visualizer. Select the feature in the Model feature list. Drawing controls appear at the bottom of the visualizer:

  • Move button

  • Rotate button

  • Resize button

Move, rotate and resize controls of a model feature in the 3D visualizer

Model feature drawing controls

1.3 Example

A cylindrical object has a feature on its side. To make the localization focus on the feature, draw a region of interest around it (the red box in the image below).

The ROI must cover only the feature, not other parts of the model:

  • Left – wrong: the ROI also covers the wall of the cylinder, which is symmetrical.

  • Right – correct: the ROI covers only the feature.

Incorrectly and correctly defined region of interest of a model feature

Model feature definition: wrong ROI (left), correct ROI (right)

2 Feature alignment

A feature alignment is a recipe that tells the localization engine how to create other candidate poses of an object it has found. Each recipe uses one type of symmetry of the object. The engine checks every candidate and measures how well the scan overlaps the model inside the ROIs of the selected model features.

2.1 Feature alignment list

The Feature alignment list shows all feature alignments of the object. You can define up to 3 feature alignments per object.

2.1.1 Execution order

Feature alignments run in the order of the list. To change the order, drag an alignment up or down.

How it works:

  1. The localization engine finds the object.

  2. The first alignment in the list creates candidates. The engine keeps the best one, which is the candidate with the highest overlap in the ROIs of the model features.

  3. The second alignment starts from that best candidate, and so on.

2.1.2 Controls

  • Status indicator – shows whether the alignment has unsaved changes.

  • Activity indicator – shows whether the alignment is enabled, disabled, or enabled with no model features selected (which means it does nothing).

  • Alignment type indicator – shows the alignment type: Rotation, Flip and Rotation or Translation.

  • Activity toggle – enables or disables the alignment.

  • Copy button – copies a feature alignment.

  • Delete button – deletes a feature alignment.

Feature alignment list with its controls

Feature alignment list

2.2 Feature alignment types

All feature alignments have these properties:

  • Name – a name to identify the alignment.

  • Type – the type of symmetry the alignment uses: Rotation, Flip and Rotation or Translation.

  • Model features – the model features the alignment uses.

Common properties of a feature alignment

Properties common to all feature alignment types

The other properties depend on the type. They are described below.

On this page, axis of symmetry means the axis around which the object would be symmetrical if it didn’t have the feature.

All types define their axis in one of two modes:

  • Basic mode – pick an axis parallel to the X, Y or Z axis of the model origin.

  • Advanced mode – define any axis. You can type the vector values, or (recommended) drag the marker in the 3D visualizer.

To see the candidates an alignment creates, drag the Steps slider in the bottom left corner of the 3D visualizer.

2.2.1 Rotation

Use Rotation when the object can be found turned around its axis of rotation symmetry. Its own properties:

  • Invariance axis – the axis of rotation symmetry of the object (basic or advanced mode).

  • Position – the position of the invariance axis relative to the origin of the object model. Use it when the origin doesn’t lie on the axis of symmetry. You can type the offset values, or (recommended) drag the marker in the 3D visualizer.

  • Steps – the number of candidates the alignment creates and tests. The candidates are spread evenly over the full turn (360°), so the angle between two neighbouring candidates is 360° / Steps.

Properties of the Rotation alignment type

Properties of the Rotation alignment type

Animation of 8 Rotation candidates, 45 degrees apart, seen along the invariance axis, with the overlap of each candidate in a bar chart

How a Rotation alignment with 8 steps works, seen along the invariance axis: the model is turned to 8 candidates, 45° apart. The candidate whose feature overlaps the point cloud best wins.

2.2.1.1 Example

A cylindrical object has a feature on its side. The object can be found turned around its axis of rotation symmetry (blue), so the feature doesn’t match the point cloud.

Cylindrical object with a feature on its side localized incorrectly

Cylindrical object with a feature on its side, found incorrectly

A Rotation alignment turns the pose found by the localization engine to the correct position:

  1. Define the model feature.

    Model feature defined on the side of a cylindrical object

    Defining the model feature

  2. Define the alignment. Place the axis on the axis of rotation symmetry of the model. As the model turns, the feature moves around the axis. The best candidate is the one with the highest overlap in the model feature region.

    Preview of a Rotation alignment candidate and the correctly found object

    One of the candidates (left) and the correctly found object (right)

2.2.2 Flip and Rotation

Use Flip and Rotation when the object can be found both flipped end to end and turned around its axis. Its own properties:

  • Invariance axis – two axes, always perpendicular to each other (basic or advanced mode):

    • Primary axis (blue) – the axis of line symmetry of the object. The object is flipped around it.

    • Secondary axis (orange) – the axis of rotation symmetry of the object. The object is turned around it.

  • Position – the position of the invariance axes relative to the origin of the object model. Use it when the origin doesn’t lie on the axes of symmetry. You can type the offset values, or (recommended) drag the marker in the 3D visualizer.

  • Steps – the number of candidates the alignment creates and tests around the Secondary axis. The candidates are spread evenly over the full turn (360°), so the angle between two neighbouring candidates is 360° / Steps.

Properties of the Flip and Rotation alignment type

Properties of the Flip and Rotation alignment type

To preview the candidates with the object flipped 180° around the Primary axis, select the Flip around primary axis check box.

2.2.2.1 Flip and Rotation vs two Rotation alignments

You can’t replace one Flip and Rotation alignment with two Rotation alignments, one that flips the model 180° around the axis of line symmetry and one that turns it around the axis of rotation symmetry. This is true in either order.

The difference is which combinations are tested:

  • Two Rotation alignments run one after the other. The first alignment picks its best candidate. The second alignment starts only from that candidate.

  • Flip and Rotation tests every rotation step both flipped and not flipped, so it tries every combination.

2.2.2.2 Example

A long cylindrical object has a feature on one of its ends. The localization engine can make two kinds of mistakes:

  • It finds the object flipped around its axis of line symmetry (green or red), so the feature is on the wrong end.

  • It finds the feature on the correct end, but turned around the axis of rotation symmetry (blue), so the feature doesn’t match the point cloud.

A Flip and Rotation alignment looks for the feature on both ends. It flips the model around its axis of line symmetry and also turns it around its axis of rotation symmetry.

Long cylindrical object with a feature on one of its ends localized incorrectly

Cylindrical object with a feature on its side, found incorrectly

To move the pose found by the localization engine to the correct position:

  1. Define the model feature.

    Model feature defined on one end of a long cylindrical object

    Defining the model feature

  2. Define the alignment:

    • Place the Primary axis on the axis of line symmetry of the model.

    • Place the Secondary axis on the axis of rotation symmetry of the model.

    When the model turns around the Secondary axis without being flipped, the feature moves around the left end of the model:

    Flip and Rotation alignment candidate with the feature on the left side

    One of the candidates, with the feature on the left end of the object

    When the model is also flipped around the Primary axis, the feature moves around the right end of the model:

    Flip and Rotation alignment candidate with the feature on the right side

    One of the candidates, with the feature on the right end of the object

2.2.3 Translation

Use Translation when the object can be found shifted along an axis. Its own properties:

  • Invariance axis – the axis of translation symmetry of the object (basic or advanced mode).

  • Position – the position of the invariance axis relative to the origin of the object model. Use it when the origin doesn’t lie on the axis of symmetry. You can type the offset values, or (recommended) drag the marker in the 3D visualizer.

  • Steps – the number of candidates the alignment creates and tests.

  • Size – the distance between two neighbouring candidates.

Steps and Size work together. For example, 20 steps with a size of 5 mm create 10 candidates on each side along the axis, 5 mm apart. The alignment can then correct a shift of up to 50 mm to each side.

Properties of the Translation alignment type

Properties of the Translation alignment type

Animation of Translation candidates shifted along the invariance axis, with the combined overlap of both model features in a bar chart

How a Translation alignment works: the model is shifted along the invariance axis in steps of Size. The candidate with the highest combined overlap in both feature regions wins.

2.2.3.1 Example

A long object can be found shifted along its axis of translation symmetry (red).

Long object found shifted along its axis of translation symmetry, first view
Long object found shifted along its axis of translation symmetry, second view

Long object found incorrectly, shifted along its axis of translation symmetry

A Translation alignment shifts the pose found by the localization engine to the correct position:

  1. Define the model features. Put one on each end of the model. When the model is in the correct place, the combined overlap in both feature regions is highest. When the model is shifted to one side, the combined overlap drops.

    Model features defined on both ends of a long object

    Defining the model features

  2. Define the alignment. Place the axis on the axis of translation symmetry of the model. As the model shifts, the features move along the axis. The best candidate is the one with the highest combined overlap in both feature regions.

    Preview of a Translation alignment candidate
    Long object found correctly after Translation alignment

    One of the candidates (top) and the correctly found object (bottom)

3 Localization settings

The localization settings have a Model feature alignment section for fine-tuning the model feature alignment.

Model feature alignment section of the localization settings

The Model feature alignment section of the localization settings

Minimal overlap initial evaluation [%]
The minimum combined overlap in all model feature regions. It is checked only once, on the pose the localization engine found, before any feature alignment runs. If the overlap is lower, the pose is rejected straight away.

Use it to drop poses that feature alignment can’t fix, and save processing time.

Default value:
0

Example: A long object is sometimes found shifted along its axis, so a Translation alignment is used. But sometimes the object is also slightly turned, and its overall surface overlap is still quite high.

  • Blue – point cloud

  • Green – the pose found by the localization engine, with the model feature regions (red)

Original candidate rejected by the Minimal overlap initial evaluation

Minimal overlap initial evaluation – this pose is rejected straight away, because the Translation alignment can’t fix it

A Translation alignment can’t fix such a pose. To reject it straight away, raise Minimal overlap initial evaluation. Then the found poses are:

  • Accepted for feature alignment if they are only shifted along the axis. Their combined overlap in the feature regions is high, above the threshold.

  • Rejected if they are turned (and maybe also shifted). Their combined overlap in the feature regions is low, below the threshold.

Minimal overlap [%]
The minimum combined overlap in all model feature regions. It is checked on the best candidate that feature alignment picked. If the overlap is lower, the candidate is rejected. This makes sure only candidates with enough overlap in the feature regions are accepted.

It also works when a model feature has no feature alignment. The localization engine creates several candidates that could end up as the best fit. This setting quickly rejects candidates with a high overall overlap but little or no overlap in the feature region.

Default value:
0

Example: A cylindrical object has a feature on its side. The object can be found turned around its axis of rotation symmetry, so the feature doesn’t match the point cloud. If the feature is not visible, or not visible well enough, a higher Minimal overlap rejects all candidates. The object is then not localized at all, instead of being localized with a guessed pose.

  • Left – with Minimal overlap = 0%, the localization engine “guesses” the pose.

  • Right – with Minimal overlap = 40%, the object is not found.

Object localized with Minimal overlap 0 percent and not found with 40 percent

Minimal overlap used so that the object is not localized when the feature is not visible

Model feature alignment method
Feature alignment creates candidates at fixed steps, so even the best candidate may not match the point cloud of the feature exactly. Often this is good enough. If not, this setting runs the fine alignment algorithm on the candidate before the final overlap in the feature region is calculated.

Options:

  • Without fine alignment – fine alignment is not used.

  • With fine alignment – fine alignment is used.

  • Recurrent with fine alignment – fine alignment is used, and then feature alignment runs once more.

Default value:
Without fine alignment

Example: A cylindrical object has a feature on its side. A Rotation alignment finds the feature correctly. Fine alignment on the best candidate makes the pose even more accurate.

  • Left – pose found with Without fine alignment.

  • Right – pose found with With fine alignment (more accurate).

Object pose without and with fine alignment after Model feature alignment

More accurate localization with fine alignment after model feature alignment

Model feature alignment point set
Which points are used to calculate the overlap in the model feature regions. The better choice depends on the object.

Options:

  • Surface – for features without sharp edges (mostly rounded surfaces).

  • Edges – for features with sharp, well-defined edges.

Default value:
Surface